//
// Created by jsjxsy on 2022/8/15.
//
#include <string>
#include <iostream>
using namespace std;
class ClassRoom {
 public:
  ClassRoom();
  ~ClassRoom();
  int getTotal();
  class Student {
   public:
    Student();
    ClassRoom *classRoom;
    void visit();
   private:
    string name;
    int age;
    int sex;
    int score;

  };
 private:
  string name;
  int students;
  string address;
};

ClassRoom::ClassRoom() {
  this->name = "class one";
  this->address = "hangzhou province good study street No.38";
  this->students = 30;
}

ClassRoom::~ClassRoom() {

}

int ClassRoom::getTotal() {
  return this->students;
}

ClassRoom::Student::Student() {
  this->name = "zhang san";
  this->sex = 1;
  this->age = 18;
  this->score = 30;
  this->classRoom = new ClassRoom();
}

void ClassRoom::Student::visit() {
  cout << "class room:" << classRoom->name
       << endl << " address:" << classRoom->address
       << " total:" << classRoom->getTotal() << endl;
  cout << "student: name" << this->name << endl;
}

int main(void) {
  ClassRoom::Student student;
  student.visit();
  ClassRoom room;
  return 0;
}